import { GeneralReturnValue } from "@/types/login";

// 文件列表
export interface listFilesData<T> {
  totalCount: number;
  pageSize: number;
  pageNo: number;
  pageTotal: number;
  list: T[];
}
export interface listFilesList {
  fileId: string;
  filePid: string;
  fileSize: number;
  fileName: string;
  fileCover: string;
  createTime: string;
  lastUpdateTime: string;
  folderType: number;
  fileCategory: number;
  fileType: number;
  status: number;
}
export interface listFilesReturnValue
  extends GeneralReturnValue<listFilesData<listFilesList>> {}

// 文件分片上传
export interface FileFragmentUploadData {
  fileId: string;
  status: string;
}
export interface FileFragmentUploadReturnValue
  extends GeneralReturnValue<FileFragmentUploadData> {}

// 获取当前目录
export interface getCurrentDirectoryData {
  fileName: string;
  fileId: string;
}
export interface getCurrentDirectoryReturnValue
  extends GeneralReturnValue<getCurrentDirectoryData[]> {}

// 获取所有目录
export interface getAllDirectoriesData {
  fileId: string;
  filePid: string;
  fileSize: number;
  fileName: string;
  fileCover: string;
  lastUpdateTime: string;
  folderType: number;
  fileCategory: number;
  fileType: number;
  status: number;
}
export interface getAllDirectoriesReturnValue
  extends GeneralReturnValue<getAllDirectoriesData[]> {}

// 创建下载链接
export interface createDownloadLinkReturnValue
  extends GeneralReturnValue<string> {}
